using DataDynamics.ActiveReports;
using DataDynamics.ActiveReports.Export.Xls;
using SM.core;
using SS;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Windows.Forms;
namespace TVSBH.func
{
	public class frmRepInput : Form
	{
		private Func objFunc = new Func();
		private DataTable objTable = new DataTable();
		private Bill objBill = new Bill();
		private IContainer components = null;
		private GroupBox groupBox1;
		private ComboBox cbbProduct;
		private System.Windows.Forms.Label label2;
		private ComboBox cbbParentGID;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label3;
		private DateTimePicker txtfromDay;
		private DateTimePicker txttoDay;
		private System.Windows.Forms.Label label4;
		private DataGridView dgvProduct;
		private Button btnSearch;
		private Button btnPrint;
		private Button btnClose;
		private ComboBox cbbProvider;
		private System.Windows.Forms.CheckBox ckbGroupAll;
		private System.Windows.Forms.CheckBox ckbProductAll;
		private System.Windows.Forms.CheckBox ckbProviderAll;
		private Button btnExportToExcel;
		private System.Windows.Forms.Label lblSumMoney;
		private System.Windows.Forms.Label lblCountBill;
		private DataGridViewTextBoxColumn Column7;
		private DataGridViewTextBoxColumn Column2;
		private DataGridViewTextBoxColumn Column5;
		private DataGridViewTextBoxColumn Packet;
		private DataGridViewTextBoxColumn ProductExpiryDate;
		private DataGridViewTextBoxColumn Column3;
		private DataGridViewTextBoxColumn Column8;
		private DataGridViewTextBoxColumn Column4;
		private DataGridViewTextBoxColumn Column6;
		private DataGridViewTextBoxColumn Column1;
		private DataGridViewTextBoxColumn Column9;
		public frmRepInput()
		{
			this.InitializeComponent();
		}
		private void frmStorageCard_Load(object sender, EventArgs e)
		{
			this.objFunc.LoadComboBox("SELECT GpID, UPPER(GpName) AS GpName FROM TabGproducts ORDER BY GpName", this.cbbParentGID, "GpID", "GpName");
			this.objFunc.LoadComboBox("SELECT CusID, UPPER(Name) AS Name FROM [TabPartner] WHERE [IsProvider] = 1 ORDER BY Name", this.cbbProvider, "CusID", "Name");
			this.dgvProduct.AutoGenerateColumns = false;
			Program.strConnectionString = this.objFunc.strConnectionString;
			this.btnSearch.PerformClick();
		}
		private void cbbParentGID_SelectedIndexChanged(object sender, EventArgs e)
		{
			this.objFunc.LoadComboBox("SELECT PID, UPPER(P_Name) AS P_Name FROM [TabProducts] WHERE [GpID] = " + this.cbbParentGID.SelectedValue.ToString() + " ORDER BY P_Name", this.cbbProduct, "PID", "P_Name");
		}
		private void cbbProduct_SelectedIndexChanged(object sender, EventArgs e)
		{
		}
		public void getDetailBalancer(string sqlQuery)
		{
			try
			{
				DataTable dataTable = new DataTable();
				DataColumn column = new DataColumn("Pid", typeof(string));
				DataColumn column2 = new DataColumn("CreateDate", typeof(string));
				DataColumn column3 = new DataColumn("BillID", typeof(string));
				DataColumn column4 = new DataColumn("ProductName", typeof(string));
				DataColumn column5 = new DataColumn("ProductUnit", typeof(string));
				DataColumn column6 = new DataColumn("ProductPrice", typeof(string));
				DataColumn column7 = new DataColumn("ProductNumber", typeof(double));
				DataColumn column8 = new DataColumn("ProductMoney", typeof(string));
				DataColumn column9 = new DataColumn("Note", typeof(string));
				DataColumn column10 = new DataColumn("Packet", typeof(string));
				DataColumn column11 = new DataColumn("ProductExpiryDate", typeof(DateTime));
				dataTable.Columns.Add(column);
				dataTable.Columns.Add(column2);
				dataTable.Columns.Add(column3);
				dataTable.Columns.Add(column4);
				dataTable.Columns.Add(column5);
				dataTable.Columns.Add(column6);
				dataTable.Columns.Add(column7);
				dataTable.Columns.Add(column8);
				dataTable.Columns.Add(column9);
				dataTable.Columns.Add(column10);
				dataTable.Columns.Add(column11);
				SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
				sqlConnection.Open();
				SqlParameter sqlParameter = new SqlParameter("objDate1", SqlDbType.DateTime);
				SqlParameter sqlParameter2 = new SqlParameter("objDate2", SqlDbType.DateTime);
				sqlParameter.Value = DateTime.Parse(this.txtfromDay.Value.ToString().Substring(0, 10) + " 00:00:00 AM");
				sqlParameter2.Value = DateTime.Parse(this.txttoDay.Value.ToString().Substring(0, 10) + " 11:59:59 PM");
				SqlCommand sqlCommand = sqlConnection.CreateCommand();
				sqlCommand.Parameters.Add(sqlParameter);
				sqlCommand.Parameters.Add(sqlParameter2);
				string text;
				if (this.ckbGroupAll.Checked)
				{
					text = "";
				}
				else
				{
					if (this.ckbProductAll.Checked)
					{
						text = " AND [TabDetailBill].[PID] IN (SELECT [PID] FROM [TabProducts] WHERE [TypeInput] IN ('IN1','IN2','IN3') AND [GpID] = " + this.cbbParentGID.SelectedValue.ToString() + ") ";
					}
					else
					{
						text = " AND [TabDetailBill].[PID] = " + this.cbbProduct.SelectedValue.ToString();
					}
				}
				string text2;
				if (this.ckbProviderAll.Checked)
				{
					text2 = "";
				}
				else
				{
					text2 = " AND [TabBill].[PID] = '" + this.cbbProvider.SelectedValue.ToString() + "'";
				}
				if (sqlQuery == "")
				{
					sqlCommand.CommandText = string.Concat(new string[]
					{
						"SELECT * FROM [TabDetailBill],[TabBill] WHERE [TypeInput] IN ('IN1','IN2','IN3') ",
						text2,
						" AND [TabDetailBill].[billID] = [TabBill].[ID] ",
						text,
						" AND [TabBill].[CreateDate] BETWEEN @objDate1 AND @objDate2 ORDER BY [TabBill].[CreateDate] ASC"
					});
				}
				else
				{
					sqlCommand.CommandText = sqlQuery;
				}
				SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
				string text3 = "";
				float num = 0f;
				while (sqlDataReader.Read())
				{
					string text4;
					if (this.checkInObjTable(sqlDataReader["CreateDate"].ToString(), dataTable))
					{
						text4 = "";
					}
					else
					{
						text4 = sqlDataReader["CreateDate"].ToString().Substring(0, 10);
					}
					if (sqlDataReader["TypeInput"].ToString() == "IN1")
					{
						text3 = "  Nhập hàng";
					}
					else
					{
						if (sqlDataReader["TypeInput"].ToString() == "IN2")
						{
							text3 = "  Nhập hàng tồn đầu";
						}
					}
					num += float.Parse(sqlDataReader["ProductPrice"].ToString()) * float.Parse(sqlDataReader["ProductNumber"].ToString());
					dataTable.Rows.Add(new object[]
					{
						sqlDataReader["Pid"].ToString(),
						text4,
						sqlDataReader["billID"].ToString(),
						sqlDataReader["ProductName"].ToString(),
						" " + sqlDataReader["ProductUnit"].ToString(),
						string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice"].ToString())),
						sqlDataReader["ProductNumber"].ToString(),
						string.Format(Program.lenAffterDecimal, float.Parse(sqlDataReader["ProductPrice"].ToString()) * float.Parse(sqlDataReader["ProductNumber"].ToString())),
						text3,
						sqlDataReader["Packet"].ToString(),
						sqlDataReader["ProductExpiryDate"].ToString()
					});
				}
				sqlDataReader.Close();
				sqlConnection.Close();
				sqlConnection.Dispose();
				this.btnPrint.Enabled = true;
				this.objTable = dataTable;
				this.dgvProduct.DataSource = this.objTable;
				if (this.objTable.Rows.Count > 0)
				{
					this.btnPrint.Enabled = true;
					this.btnExportToExcel.Enabled = true;
				}
				else
				{
					this.btnPrint.Enabled = false;
					this.btnExportToExcel.Enabled = false;
				}
				this.lblSumMoney.Text = string.Format(Program.lenAffterDecimal, num);
				this.lblCountBill.Text = "Có " + this.dgvProduct.Rows.Count.ToString() + " sản phẩm được nhập hàng";
			}
			catch
			{
				this.btnPrint.Enabled = false;
				this.objTable = null;
				this.dgvProduct.DataSource = this.objTable;
			}
		}
		private bool checkInObjTable(string tmpDate, DataTable tmpTbale)
		{
			bool flag = false;
			bool result;
			for (int i = 0; i < tmpTbale.Rows.Count; i++)
			{
				if (tmpTbale.Rows[i]["CreateDate"].ToString() == tmpDate.Substring(0, 10))
				{
					flag = true;
					result = flag;
					return result;
				}
			}
			result = flag;
			return result;
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			this.getDetailBalancer("");
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmRepInputPrint.objTable = new DataTable();
			frmRepInputView frmRepInputView = new frmRepInputView();
			frmRepInputView.dateTime = "Từ " + this.txtfromDay.Text + " đến " + this.txttoDay.Text;
			if (!this.ckbProductAll.Checked)
			{
				frmRepInputView.productName = "Tên hàng hoá : " + this.cbbProduct.Text;
			}
			else
			{
				frmRepInputView.productName = "Tên hàng hoá : Tất cả";
			}
			if (!this.ckbGroupAll.Checked)
			{
				frmRepInputView.productGroup = "Nhóm hàng hoá : " + this.cbbParentGID.Text;
			}
			else
			{
				frmRepInputView.productName = "Tên hàng hoá : Tất cả";
				frmRepInputView.productGroup = "Nhóm hàng hoá : Tất cả";
			}
			if (!this.ckbProviderAll.Checked)
			{
				frmRepInputView.providerName = "Nhà cung cấp : " + this.cbbProvider.Text;
			}
			else
			{
				frmRepInputView.providerName = "Nhà cung cấp : Tất cả";
			}
			frmRepInputPrint.objTable = this.objTable;
			frmRepInputView.ShowDialog();
		}
		private void btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void btnExportToExcel_Click(object sender, EventArgs e)
		{
			try
			{
				frmRepInputPrint.objTable = new DataTable();
				frmRepInputPrint.objTable = this.objTable;
				ActiveReport3 activeReport = new frmRepInputPrint();
				activeReport.Run();
				XlsExport xlsExport = new XlsExport();
				SaveFileDialog saveFileDialog = new SaveFileDialog();
				saveFileDialog.ShowDialog();
				string text = saveFileDialog.FileName;
				if (text != "")
				{
					if (!text.ToUpper().Contains(".XLS"))
					{
						text += ".xls";
					}
					xlsExport.Export(activeReport.Document, text);
					MessageBox.Show("Hệ thống đã hoàn thành việc xuất dữ liệu ra file Excel", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				}
				else
				{
					MessageBox.Show("Bạn chưa chọn đường dẫn và tên file cần xuất!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
			}
			catch
			{
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmRepInput));
			this.groupBox1 = new GroupBox();
			this.ckbProviderAll = new System.Windows.Forms.CheckBox();
			this.ckbProductAll = new System.Windows.Forms.CheckBox();
			this.ckbGroupAll = new System.Windows.Forms.CheckBox();
			this.cbbProvider = new ComboBox();
			this.label4 = new System.Windows.Forms.Label();
			this.txttoDay = new DateTimePicker();
			this.label3 = new System.Windows.Forms.Label();
			this.txtfromDay = new DateTimePicker();
			this.cbbProduct = new ComboBox();
			this.label2 = new System.Windows.Forms.Label();
			this.cbbParentGID = new ComboBox();
			this.label1 = new System.Windows.Forms.Label();
			this.dgvProduct = new DataGridView();
			this.Column7 = new DataGridViewTextBoxColumn();
			this.Column2 = new DataGridViewTextBoxColumn();
			this.Column5 = new DataGridViewTextBoxColumn();
			this.Packet = new DataGridViewTextBoxColumn();
			this.ProductExpiryDate = new DataGridViewTextBoxColumn();
			this.Column3 = new DataGridViewTextBoxColumn();
			this.Column8 = new DataGridViewTextBoxColumn();
			this.Column4 = new DataGridViewTextBoxColumn();
			this.Column6 = new DataGridViewTextBoxColumn();
			this.Column1 = new DataGridViewTextBoxColumn();
			this.Column9 = new DataGridViewTextBoxColumn();
			this.btnSearch = new Button();
			this.btnPrint = new Button();
			this.btnClose = new Button();
			this.btnExportToExcel = new Button();
			this.lblSumMoney = new System.Windows.Forms.Label();
			this.lblCountBill = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			((ISupportInitialize)this.dgvProduct).BeginInit();
			base.SuspendLayout();
			this.groupBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.ckbProviderAll);
			this.groupBox1.Controls.Add(this.ckbProductAll);
			this.groupBox1.Controls.Add(this.ckbGroupAll);
			this.groupBox1.Controls.Add(this.cbbProvider);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.txttoDay);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.txtfromDay);
			this.groupBox1.Controls.Add(this.cbbProduct);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.cbbParentGID);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox1.Location = new System.Drawing.Point(7, 2);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(887, 91);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin tìm kiếm";
			this.ckbProviderAll.AutoSize = true;
			this.ckbProviderAll.Checked = true;
			this.ckbProviderAll.CheckState = CheckState.Checked;
			this.ckbProviderAll.Font = new Font("Arial", 9f);
			this.ckbProviderAll.Location = new System.Drawing.Point(585, 28);
			this.ckbProviderAll.Name = "ckbProviderAll";
			this.ckbProviderAll.Size = new Size(167, 19);
			this.ckbProviderAll.TabIndex = 61;
			this.ckbProviderAll.Text = "Chọn tất cả Nhà cung cấp";
			this.ckbProviderAll.UseVisualStyleBackColor = true;
			this.ckbProductAll.AutoSize = true;
			this.ckbProductAll.Checked = true;
			this.ckbProductAll.CheckState = CheckState.Checked;
			this.ckbProductAll.Font = new Font("Arial", 9f);
			this.ckbProductAll.Location = new System.Drawing.Point(503, 58);
			this.ckbProductAll.Name = "ckbProductAll";
			this.ckbProductAll.Size = new Size(71, 19);
			this.ckbProductAll.TabIndex = 59;
			this.ckbProductAll.Text = "Xem hết";
			this.ckbProductAll.UseVisualStyleBackColor = true;
			this.ckbGroupAll.AutoSize = true;
			this.ckbGroupAll.Checked = true;
			this.ckbGroupAll.CheckState = CheckState.Checked;
			this.ckbGroupAll.Font = new Font("Arial", 9f);
			this.ckbGroupAll.Location = new System.Drawing.Point(503, 29);
			this.ckbGroupAll.Name = "ckbGroupAll";
			this.ckbGroupAll.Size = new Size(71, 19);
			this.ckbGroupAll.TabIndex = 58;
			this.ckbGroupAll.Text = "Xem hết";
			this.ckbGroupAll.UseVisualStyleBackColor = true;
			this.cbbProvider.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.cbbProvider.BackColor = Color.White;
			this.cbbProvider.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbProvider.FlatStyle = FlatStyle.Flat;
			this.cbbProvider.Font = new Font("Arial", 9f);
			this.cbbProvider.FormattingEnabled = true;
			this.cbbProvider.Location = new System.Drawing.Point(585, 54);
			this.cbbProvider.Name = "cbbProvider";
			this.cbbProvider.Size = new Size(288, 23);
			this.cbbProvider.TabIndex = 56;
			this.label4.AutoSize = true;
			this.label4.Font = new Font("Arial", 9f);
			this.label4.Location = new System.Drawing.Point(8, 57);
			this.label4.Name = "label4";
			this.label4.Size = new Size(65, 15);
			this.label4.TabIndex = 55;
			this.label4.Text = "Đến ngày :";
			this.txttoDay.CustomFormat = "dd/MM/yyyy";
			this.txttoDay.Font = new Font("Arial", 9f);
			this.txttoDay.Format = DateTimePickerFormat.Custom;
			this.txttoDay.Location = new System.Drawing.Point(75, 55);
			this.txttoDay.Name = "txttoDay";
			this.txttoDay.Size = new Size(100, 21);
			this.txttoDay.TabIndex = 54;
			this.label3.AutoSize = true;
			this.label3.Font = new Font("Arial", 9f);
			this.label3.Location = new System.Drawing.Point(16, 30);
			this.label3.Name = "label3";
			this.label3.Size = new Size(57, 15);
			this.label3.TabIndex = 53;
			this.label3.Text = "Từ ngày :";
			this.txtfromDay.CustomFormat = "dd/MM/yyyy";
			this.txtfromDay.Font = new Font("Arial", 9f);
			this.txtfromDay.Format = DateTimePickerFormat.Custom;
			this.txtfromDay.Location = new System.Drawing.Point(75, 27);
			this.txtfromDay.Name = "txtfromDay";
			this.txtfromDay.Size = new Size(100, 21);
			this.txtfromDay.TabIndex = 52;
			this.cbbProduct.BackColor = Color.White;
			this.cbbProduct.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbProduct.FlatStyle = FlatStyle.Flat;
			this.cbbProduct.Font = new Font("Arial", 9f);
			this.cbbProduct.FormattingEnabled = true;
			this.cbbProduct.Location = new System.Drawing.Point(255, 54);
			this.cbbProduct.Name = "cbbProduct";
			this.cbbProduct.Size = new Size(242, 23);
			this.cbbProduct.TabIndex = 48;
			this.cbbProduct.SelectedIndexChanged += new EventHandler(this.cbbProduct_SelectedIndexChanged);
			this.label2.AutoSize = true;
			this.label2.Font = new Font("Arial", 9f);
			this.label2.Location = new System.Drawing.Point(185, 58);
			this.label2.Name = "label2";
			this.label2.Size = new Size(67, 15);
			this.label2.TabIndex = 49;
			this.label2.Text = "Tên thuốc :";
			this.cbbParentGID.BackColor = Color.White;
			this.cbbParentGID.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbParentGID.FlatStyle = FlatStyle.Flat;
			this.cbbParentGID.Font = new Font("Arial", 9f);
			this.cbbParentGID.FormattingEnabled = true;
			this.cbbParentGID.Location = new System.Drawing.Point(255, 26);
			this.cbbParentGID.Name = "cbbParentGID";
			this.cbbParentGID.Size = new Size(242, 23);
			this.cbbParentGID.TabIndex = 45;
			this.cbbParentGID.SelectedIndexChanged += new EventHandler(this.cbbParentGID_SelectedIndexChanged);
			this.label1.AutoSize = true;
			this.label1.Font = new Font("Arial", 9f);
			this.label1.Location = new System.Drawing.Point(182, 30);
			this.label1.Name = "label1";
			this.label1.Size = new Size(70, 15);
			this.label1.TabIndex = 47;
			this.label1.Text = "Loại thuốc :";
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.AllowUserToDeleteRows = false;
			this.dgvProduct.AllowUserToOrderColumns = true;
			this.dgvProduct.AllowUserToResizeColumns = false;
			this.dgvProduct.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvProduct.BackgroundColor = Color.White;
			this.dgvProduct.BorderStyle = BorderStyle.Fixed3D;
			this.dgvProduct.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvProduct.Columns.AddRange(new DataGridViewColumn[]
			{
				this.Column7,
				this.Column2,
				this.Column5,
				this.Packet,
				this.ProductExpiryDate,
				this.Column3,
				this.Column8,
				this.Column4,
				this.Column6,
				this.Column1,
				this.Column9
			});
			this.dgvProduct.Cursor = Cursors.Hand;
			this.dgvProduct.EnableHeadersVisualStyles = false;
			this.dgvProduct.Location = new System.Drawing.Point(7, 99);
			this.dgvProduct.MultiSelect = false;
			this.dgvProduct.Name = "dgvProduct";
			this.dgvProduct.ReadOnly = true;
			this.dgvProduct.RowHeadersVisible = false;
			this.dgvProduct.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvProduct.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvProduct.Size = new Size(886, 441);
			this.dgvProduct.TabIndex = 2;
			this.Column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column7.DataPropertyName = "CreateDate";
			dataGridViewCellStyle2.Format = "D";
			dataGridViewCellStyle2.NullValue = null;
			this.Column7.DefaultCellStyle = dataGridViewCellStyle2;
			this.Column7.HeaderText = "Ngày HĐ";
			this.Column7.MinimumWidth = 90;
			this.Column7.Name = "Column7";
			this.Column7.ReadOnly = true;
			this.Column7.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column7.Width = 90;
			this.Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column2.DataPropertyName = "BillID";
			this.Column2.HeaderText = "Hoá đơn";
			this.Column2.MinimumWidth = 120;
			this.Column2.Name = "Column2";
			this.Column2.ReadOnly = true;
			this.Column2.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column2.Width = 120;
			this.Column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column5.DataPropertyName = "productName";
			this.Column5.HeaderText = "Hàng hoá";
			this.Column5.MinimumWidth = 150;
			this.Column5.Name = "Column5";
			this.Column5.ReadOnly = true;
			this.Column5.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column5.Width = 150;
			this.Packet.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Packet.DataPropertyName = "Packet";
			this.Packet.HeaderText = "Số lô";
			this.Packet.MinimumWidth = 120;
			this.Packet.Name = "Packet";
			this.Packet.ReadOnly = true;
			this.Packet.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Packet.Width = 120;
			this.ProductExpiryDate.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.ProductExpiryDate.DataPropertyName = "ProductExpiryDate";
			dataGridViewCellStyle3.Format = "D";
			dataGridViewCellStyle3.NullValue = null;
			this.ProductExpiryDate.DefaultCellStyle = dataGridViewCellStyle3;
			this.ProductExpiryDate.HeaderText = "Hạn sử dụng";
			this.ProductExpiryDate.MinimumWidth = 105;
			this.ProductExpiryDate.Name = "ProductExpiryDate";
			this.ProductExpiryDate.ReadOnly = true;
			this.ProductExpiryDate.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.ProductExpiryDate.Width = 105;
			this.Column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column3.DataPropertyName = "productUnit";
			this.Column3.HeaderText = "Đơn vị tính";
			this.Column3.MinimumWidth = 100;
			this.Column3.Name = "Column3";
			this.Column3.ReadOnly = true;
			this.Column3.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column8.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column8.DataPropertyName = "productPrice";
			dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle4.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.Column8.DefaultCellStyle = dataGridViewCellStyle4;
			this.Column8.HeaderText = "Đơn giá";
			this.Column8.MinimumWidth = 100;
			this.Column8.Name = "Column8";
			this.Column8.ReadOnly = true;
			this.Column8.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column4.DataPropertyName = "productNumber";
			dataGridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle5.Format = "N0";
			dataGridViewCellStyle5.NullValue = "0";
			this.Column4.DefaultCellStyle = dataGridViewCellStyle5;
			this.Column4.HeaderText = "Số lượng";
			this.Column4.MinimumWidth = 85;
			this.Column4.Name = "Column4";
			this.Column4.ReadOnly = true;
			this.Column4.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column4.Width = 85;
			this.Column6.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column6.DataPropertyName = "ProductMoney";
			dataGridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle6.Format = "N0";
			dataGridViewCellStyle6.NullValue = null;
			this.Column6.DefaultCellStyle = dataGridViewCellStyle6;
			this.Column6.HeaderText = "Thành tiền";
			this.Column6.MinimumWidth = 100;
			this.Column6.Name = "Column6";
			this.Column6.ReadOnly = true;
			this.Column6.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.Column1.DataPropertyName = "Note";
			this.Column1.HeaderText = "Ghi chú";
			this.Column1.Name = "Column1";
			this.Column1.ReadOnly = true;
			this.Column1.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column9.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column9.DataPropertyName = "Pid";
			this.Column9.HeaderText = "Mã sản phẩm";
			this.Column9.Name = "Column9";
			this.Column9.ReadOnly = true;
			this.Column9.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column9.Visible = false;
			this.btnSearch.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSearch.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSearch.Location = new System.Drawing.Point(7, 566);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new Size(73, 30);
			this.btnSearch.TabIndex = 44;
			this.btnSearch.Text = "Tìm kiếm";
			this.btnSearch.UseVisualStyleBackColor = true;
			this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.Enabled = false;
			this.btnPrint.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new System.Drawing.Point(81, 566);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(102, 30);
			this.btnPrint.TabIndex = 43;
			this.btnPrint.Text = "Xem và in [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = true;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new System.Drawing.Point(802, 566);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(91, 30);
			this.btnClose.TabIndex = 42;
			this.btnClose.Text = "Thoát  [ ESC ]";
			this.btnClose.UseVisualStyleBackColor = true;
			this.btnClose.Click += new EventHandler(this.btnClose_Click);
			this.btnExportToExcel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnExportToExcel.Enabled = false;
			this.btnExportToExcel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnExportToExcel.Location = new System.Drawing.Point(184, 566);
			this.btnExportToExcel.Name = "btnExportToExcel";
			this.btnExportToExcel.Size = new Size(102, 30);
			this.btnExportToExcel.TabIndex = 46;
			this.btnExportToExcel.Text = "Xuất File Excel";
			this.btnExportToExcel.UseVisualStyleBackColor = true;
			this.btnExportToExcel.Click += new EventHandler(this.btnExportToExcel_Click);
			this.lblSumMoney.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.lblSumMoney.BackColor = Color.White;
			this.lblSumMoney.BorderStyle = BorderStyle.Fixed3D;
			this.lblSumMoney.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.lblSumMoney.Location = new System.Drawing.Point(654, 543);
			this.lblSumMoney.Name = "lblSumMoney";
			this.lblSumMoney.Size = new Size(100, 20);
			this.lblSumMoney.TabIndex = 47;
			this.lblSumMoney.Text = "-:-";
			this.lblSumMoney.TextAlign = ContentAlignment.MiddleRight;
			this.lblCountBill.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.lblCountBill.BackColor = Color.White;
			this.lblCountBill.BorderStyle = BorderStyle.Fixed3D;
			this.lblCountBill.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.lblCountBill.Location = new System.Drawing.Point(7, 543);
			this.lblCountBill.Name = "lblCountBill";
			this.lblCountBill.Size = new Size(643, 20);
			this.lblCountBill.TabIndex = 48;
			this.lblCountBill.Text = "-:-";
			this.lblCountBill.TextAlign = ContentAlignment.MiddleCenter;
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(900, 600);
			base.Controls.Add(this.lblCountBill);
			base.Controls.Add(this.lblSumMoney);
			base.Controls.Add(this.btnExportToExcel);
			base.Controls.Add(this.btnSearch);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.dgvProduct);
			base.Controls.Add(this.groupBox1);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.Name = "frmRepInput";
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "BÁO CÁO NHẬP HÀNG";
			base.Load += new EventHandler(this.frmStorageCard_Load);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			((ISupportInitialize)this.dgvProduct).EndInit();
			base.ResumeLayout(false);
		}
	}
}
